package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 单据主记录
 */
@Table(name="t_order")
public class Order extends BaseEntity{

    @Validate
    @Column(length = 23,unique=true)
    private String code;

    /**
     * 订单id   采购就是采购订单id  销售就是销售订单id
     */
    @Column(length = 19)
    private Long orderId;

    /**
     * 订单编号   采购就是采购订单id  销售就是销售订单id
     */
    @Column(length = 19)
    private Long orderCode;

    /**
     * 单据类型  App.BILL_TYPE
     */
    @Column(length = 19)
    private Integer orderType;

    /**
     * 退货来源  App.ThType
     */
    @Column(length = 19)
    private Integer thType;

    /**
     * 业务类型  1 进货/售货  2 退货
     */
    @Column(length = 11)
    private Integer bussType;

    /**
     * 供应商或者客户  采购是供应商  销售是客户
     */
    @Column(length = 20)
    @Validate
    private Long relationId;

    @Validate
    @Column(length = 19)
    private Long companyId;

    /**
     * 采购日期
     */
    @Column(length = 20)
    @Validate
    private Long date;

    /**
     * 订单金额（应付）
     */
    @Column(length = 20)
    private Long dueMoney;

    /**
     * 实付
     */
    @Column(length = 20)
    private Long realMoney;

    /**
     * 折让
     */
    @Column(length = 20)
    private Long discountMoney;

    /**
     * 欠款
     */
    @Column(length = 20)
    private Long debtMoney;

    /**
     * 采购总费用
     */
    @Column(length = 20)
    private Long purPrice;

    /**
     * 客户承担费用
     */
    @Column(length = 20)
    private Long customerMoney;

    /**
     * 累计核销金额 默认值0
     */
    @Column(length = 20)
    private Long verificateMoney;

    @Column(length = 50)
    private String remarks;

    @Validate
    @Column(length = 11)
    private Integer status;

    /**
     * 退货状态
     */
    @Column(length = 11)
    private Integer thStatus;

    @Validate
    private Long createUserId;

    @Validate
    private Long createTime;

    @Validate(insert=false,update=true)
    private Long updateUserId;

    @Validate(insert=false,update=true)
    private Long updateTime;

    public Long getVerificateMoney() {
        return verificateMoney;
    }

    public void setVerificateMoney(Long verificateMoney) {
        this.verificateMoney = verificateMoney;
    }

    public Integer getThStatus() {
        return thStatus;
    }

    public void setThStatus(Integer thStatus) {
        this.thStatus = thStatus;
    }

    public Long getCustomerMoney() {
        return customerMoney;
    }

    public void setCustomerMoney(Long customerMoney) {
        this.customerMoney = customerMoney;
    }

    public Long getPurPrice() {
        return purPrice;
    }

    public void setPurPrice(Long purPrice) {
        this.purPrice = purPrice;
    }

    public Long getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(Long orderCode) {
        this.orderCode = orderCode;
    }

    public Integer getThType() {
        return thType;
    }

    public void setThType(Integer thType) {
        this.thType = thType;
    }

    public Integer getBussType() {
        return bussType;
    }

    public void setBussType(Integer bussType) {
        this.bussType = bussType;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getRelationId() {
        return relationId;
    }

    public void setRelationId(Long relationId) {
        this.relationId = relationId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getDate() {
        return date;
    }

    public void setDate(Long date) {
        this.date = date;
    }

    public Long getDueMoney() {
        return dueMoney;
    }

    public void setDueMoney(Long dueMoney) {
        this.dueMoney = dueMoney;
    }

    public Long getRealMoney() {
        return realMoney;
    }

    public void setRealMoney(Long realMoney) {
        this.realMoney = realMoney;
    }

    public Long getDiscountMoney() {
        return discountMoney;
    }

    public void setDiscountMoney(Long discountMoney) {
        this.discountMoney = discountMoney;
    }

    public Long getDebtMoney() {
        return debtMoney;
    }

    public void setDebtMoney(Long debtMoney) {
        this.debtMoney = debtMoney;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

}
